package test.service;

import org.springframework.security.access.annotation.Secured;
import org.springframework.stereotype.Service;

/**
 * 方法上的注解就是这个了。@Secured({ROLES})
 * <p>
 * Created by 张少昆 on 2017/12/24.
 */
@Service
public class UserService {
    @Secured( {"ROLE_USER", "ROLE_ADMIN"} )
    public String test(){
        return "test";
    }
}
